Completeness of monad-based dynamic logic

نویسندگان

  • Till Mossakowski
  • Lutz Schröder
  • Sergey Goncharov
چکیده

Monads are used in functional programming as a means of modeling and encapsulating computational effects at an appropriate level of abstraction. In previous work, we have introduced monad-based dynamic logic and have used it for the specification and verification of various monadic functional-imperative algorithms over different monads. The semantics of this logic was originally defined over partial cartesian closed categories; completeness issues were explicitly left out of consideration. Here, we slightly simplify the logic and reformulate it in the weaker setting of a strong monad over a cartesian category with some additional infrastructure. We provide an extended proof calculus and prove its soundness and completeness. The presence of computational effects, e.g. state, store, exceptions, input, output, non-determinism, or backtracking, substantially complicates reasoning about programs. Dealing with such features has in the past typically required dedicated logics, designed specifically for a particular combination of effects. As a unifying concept for modeling computational effects (in particular, all of those mentioned above) in an elegant way, monads, a well-known tool from category theory, have been established by Moggi in the seminal paper [5]. Based on this work, monads now form the basis of the treatment of encapsulated side effects in the functional programming language Haskell [11], which thanks to this concept admits clean programming in an imperative style. Monads have also appeared in programming semantics, e.g. for Java [3]. In previous work, we have introduced a monad-based Hoare calculus [9] and a dynamic logic [10] that allow reasoning about such generic effects. The semantics and proof calculus of both logics are parametrized over a monad (and hence, over a notion of side effect). The particular (combination of) effects needed for an application can then be axiomatically specified in the general framework. Monad-based dynamic logic (MDL) is similar to Pitts’ evaluation logic [7], but equipped with a rather different semantics which is induced directly by the underlying monad. So far, no completeness result has been proved for either of these logics. Here, we fill in this gap in the theory. We simplify MDL by detaching it from the HasCasl framework as used in [10]. Instead, we introduce a term language and semantics based on cartesian categories. The resulting calculus, slightly extended in relation to the calculus presented in [10], is shown to be

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Weak Completeness of Coalgebraic Dynamic Logics

We present a coalgebraic generalisation of Fischer and Ladner’s Propositional Dynamic Logic (PDL) and Parikh’s Game Logic (GL). In earlier work, we proved a generic strong completeness result for coalgebraic dynamic logics without iteration. The coalgebraic semantics of such programs is given by a monad T , and modalities are interpreted via a predicate lifting λ whose transpose is a monad morp...

متن کامل

Strong Completeness for Iteration-Free Coalgebraic Dynamic Logics

We present a (co)algebraic treatment of iteration-free dynamic modal logics such as Propositional Dynamic Logic (PDL) and Game Logic (GL), both without star. The main observation is that the program/game constructs of PDL/GL arise from monad structure, and the axioms of these logics correspond to certain compatibilty requirements between the modalities and this monad structure. Our main contrib...

متن کامل

Completeness of Global Evaluation Logic

Monads serve the abstract encapsulation of side effects in semantics and functional programming. Various monad-based specification languages have been introduced in order to express requirements on generic side-effecting programs. A basic role is played here by global evaluation logic, concerned with formulae which may be thought of as being universally quantified over the state space; this for...

متن کامل

Monad-Based Logics for Computational Effects

The presence of computational effects, such as state, store, exceptions, input, output, non-determinism, backtracking etc., complicates the reasoning about programs. In particular, usually for each effect (or each combination of these), an own logic needs to be designed. Monads are a well-known tool from category theory that originally has been invented for studying algebraic structures. Monads...

متن کامل

Dialectica Categories and Games with Bidding

This paper presents a construction which transforms categorical models of additive-free propositional linear logic, closely based on de Paiva’s dialectica categories and Oliva’s functional interpretations of classical linear logic. The construction is defined using dependent type theory, which proves to be a useful tool for reasoning about dialectica categories. Abstractly, we have a closure op...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006